<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	
</body>
</html>
<script>
function bbb(arr){	
	for (var i = 0 ; i < arr.length-1 ; i++){
		for (var j=0; j < arr.length-1-i; j++){
			if (arr[j] > arr[j+1]){
				var temp = arr[j];
				arr[j] = arr[j+1];
				arr[j+1] = temp;
			}

		}
	}

}
arr1 = [3,2,8,6,9];
bbb (arr1)
console.log(arr1);
	


</script>